-- add modes: debug and release
add_rules("mode.debug", "mode.release")
add_requires("pybind11")
add_requireconfs("pybind11.python", {override = true, version = "3.8"})
set_languages("cxx11")

target("pyext")
    add_packages("pybind11")

    add_rules("python.library")

    add_files("src/main.cpp")

    after_build(function(target)
      local targetfile = target:targetfile()
      os.cp(targetfile, path.join("./", path.filename(targetfile)))
      print("python setup.py develop")
      os.run("python setup.py develop")
    end)

